/*! \file routines.h
 *	\brief <write description for routines.h>
 *
 *	created:	2009/11/23
 *	created:	23:11:2009   16:12
 *	filename: 	o:\gag-engine\libs\mem\impl\routines.h
 *	file path:	o:\gag-engine\libs\mem\impl
 *	file base:	routines
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _MEM_ROUTINES_H_
#define _MEM_ROUTINES_H_

#pragma once

#include "../defs.h"

#if TT_MEM_ENABLED

namespace tt{
namespace mem{
namespace impl{

MEM_API void* mgt_malloc(std::size_t);
MEM_API void mgt_free(void*);

MEM_API void* mgt_new(std::size_t count);
MEM_API void* mgt_new_array(std::size_t count);

MEM_API void* mgt_new(void* mem_section, std::size_t count);
MEM_API void* mgt_new_array(void* mem_section, std::size_t count);

MEM_API void mgt_delete(void* p);
MEM_API void mgt_delete_array(void* p);

//MEM_API unsigned int mgt_size(void* p);

#if TT_MEM_PROFILING
extern MEM_API bool g_my_mem_function;
#endif //TT_MEM_PROFILING

} //namespace impl
} //namespace mem
} //namespace tt

#endif //TT_MEM_ENABLED

#endif //_MEM_ROUTINES_H_